<?php
/**
 * Soar Framework - Lightweight and simple to use PHP Framework
 *
 * Soar is free software and is distributed WITHOUT ANY WARRANTY
 *
 * @package Soar
 * @version 1.0 $Id: View.php 2 2012-04-06 21:50:33Z shay@shayanderson.com $
 * @copyright Copyright (c) 2012 ShayAnderson.com
 * @license http://www.gnu.org/licenses/gpl.html GPL License
 * @link http://www.shayanderson.com/projects/soar-php-framework.htm
 */

/**
 * Soar Framework View Class
 *
 * @package Soar
 * @name View
 * @author Shay Anderson 04.12
 */
final class View extends SoarView
{
	/**
	 * Echo/display template
	 *
	 * @param string $template_file_path
	 * @return void
	 */
	public function display($template_file_path)
	{
		$this->_tpl_engine->display($template_file_path);
		$this->_is_displayed = true; // important do not remove
	}

	/**
	 * Compiled template getter
	 *
	 * @param string $template_file_path
	 * @return string
	 */
	public function fetch($template_file_path)
	{
		return $this->_tpl_engine->fetch($template_file_path);
	}

	/**
	 * Template var getter
	 *
	 * @param string $var
	 * @return mixed
	 */
	public function get($var)
	{
		return $this->_tpl_engine->get($var);
	}

	/**
	 * Template var setter
	 *
	 * @param string $var
	 * @param mixed $value
	 * @return void
	 */
	public function set($var, $value = NULL)
	{
		$this->_tpl_engine->set($var, $value);
	}
}
?>